package com.zzzyh.forumsystemclient.services;

import com.zzzyh.forumsystemclient.model.LoginUser;
import com.zzzyh.forumsystemclient.model.Moment;
import com.zzzyh.forumsystemclient.model.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IUserService {
    String login(String username, String password);

    void register(User user);

    User getUserinfoByUserId(Integer userId);

    void updateProfile(User user);

    Boolean usernameExists(String username, Integer userId);

    void updatePassword(String encodedNewPassword,Integer userId);

    boolean usernameAndEmailExists(String username, String email);

    Integer selectUserIdByUsername(String username);

    void updateUserIpInfo(User ipUser);

    List<Moment> myTalk(Integer userId);

    void delMyTalk(Integer talkId);

    Integer isFollowAuthor(@Param("myId") Integer myId, @Param("userId") Integer userId);

    void followUser(@Param("myId") Integer myId, @Param("userId") Integer userId);

    void unFollowUser(@Param("myId") Integer myId, @Param("userId") Integer userId);

    Integer totalPosts(Integer userId);

    Integer totalLikes(@Param("userId") Integer userId);

    Integer totalFollowers(@Param("userId") Integer userId);
}
